n, m = map(int, input().split())
arr = []
arr = list(map(int, input().split()))
for i in range(0, m):
    sum = 0
    for j in range(0, n):
        sum += arr[j]
        arr[j] = sum // (j + 1)
        pass
    flag = False
    for j in range(0, n):
        if arr[j] != 1:
            flag = True
            break
        pass
    if flag == False:
        break
    pass
for i in range(0, n):
    arr[i] %= 998244353998244353
    pass
for i in range(0, n):
    print(1, end=" ")
    pass